package org.mipt.infsec.steganography.api.datastorage.keys;

/**
 * Class describes abstract key
 * Key type is described by T generic
 */
public abstract class Key<T>
{
    T value;

    /**
     * get value of key
     * @return key value
     */
    public T getValue()
    {
        return this.value;
    }


    /**
     * set key value
     * @param value new value of key
     */
    public void setValue(T value)
    {
        this.value = value;
    }

    /**
     * Abstract method which should hide key
     * @return hidden key
     */
    public abstract Object hideKey();

    /**
     * Abstract method which should seek key in specific object
     * @param key key object
     * @throws ClassCastException when wrong class entered to method
     */
    public abstract void seekKey(Object key) throws ClassCastException;


}
